package other;

class Rectangle {

    double length;
    double width;

    public double getLength() {
        return length;
    }

    public void setLength(double height) {
        this.length = length;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }
}

class Square extends Rectangle {
    public void setWidth(double width) {
        super.setLength(width);
        super.setWidth(width);
    }

    public void setLength(double length) {
        super.setLength(length);
        super.setWidth(length);
    }
}

class TestRectangle {
    public void resize(Rectangle objRect) {
        while (objRect.getWidth() <= objRect.getLength()) {
            objRect.setWidth(objRect.getWidth() + 1);
        }
    }
}
